<?php defined('TSTP_PACKAGE') or die('forbidden');


/**
* MLT Web Engine
* http://www.molotsoft.ru
*
* @package MLT_WE
* @subpackage Test_Types
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: datetime.tstp.php 239 2009-05-23 05:28:38Z molotsoft@gmail.com $
* @link $HeadURL: http://test-types.googlecode.com/svn/tags/latest/types/datetime/datetime.tstp.php $
*/


define('TSTP_DATETIME_ISO_PATTERN', '~^((\d{4})-(\d{2})-(\d{2})) ((\d{2})\:(\d{2})\:(\d{2}))$~');

function tstp_datetime($var) {
	return (bool)preg_match(TSTP_DATETIME_ISO_PATTERN, $var, $match) ? (tstp_date($match[1]) && tstp_time($match[5])) : FALSE;
}


?>